<!doctype html>
<html lang="en">
	<head>

		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1">

		<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous">

        <link href="./static/css/buttons.css" rel="stylesheet" integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous">

		<title>写 - 棉花糖</title>
	</head>
	<body class="body">

        <div class="modal fade" id="notice" data-bs-backdrop="true" data-bs-keyboard="false" data-bs- tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
            <div class="modal-dialog modal-dialog-centered">
                <div class="modal-content">
                    <div class="modal-header">
                        <h5 class="modal-title" id="noticetitle">确认提交</h5>
                        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                    </div>
                    <div class="modal-body">
                        提交后将无法更改，建议在确认一遍后提交。<br>
                        <b>提交后文字将消失，请提前备份</b>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">关闭</button>
                        <button type="button" class="btn btn-outline-success" onclick="gogogo()" data-bs-dismiss="modal">确认提交</button>
                    </div>
                </div>
            </div>
        </div>

        <div class="modal fade" id="done" data-bs-backdrop="true" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
            <div class="modal-dialog modal-dialog-centered">
                <div class="modal-content">
                    <div class="modal-header">
                        <h5 class="modal-title" id="noticetitle">提交成功</h5>
                        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close" ></button>
                    </div>
                    <div class="modal-body">
                        <span id='donenotice'></span>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal" >关闭</button>
                    </div>
                </div>
            </div>
        </div>

		<div class="modal fade" id="false" data-bs-backdrop="true" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
            <div class="modal-dialog modal-dialog-centered">
                <div class="modal-content">
                    <div class="modal-header">
                        <h5 class="modal-title" id="noticetitle">提交失败</h5>
                        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close" ></button>
                    </div>
                    <div class="modal-body">
                        <span id='falsenotice'></span>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-outline-danger" data-bs-dismiss="modal" >关闭</button>
                    </div>
                </div>
            </div>
        </div>

		<div id="main">
			<div>
				<nav class="navbar navbar-expand-md navbar-dark bg-dark">
					<div class="container-fluid">
						<span class="navbar-brand m-1 mb-0 h1">
							<a href="#/" class="m-1" style="text-decoration: none; color: inherit;">写 - 棉花糖</a>
						</span>
                        <div class='col-3'>
                            <a href="./login" type="button" class="btn btn-outline-success">管理面板</a>
                            <a href="./read" type="button" class="btn btn-outline-success ">读棉花糖</a>
                        </div>
					</div>
				</nav>
				<div class="container" style="text-align: center;">
					<div class="row">
						<div class="col-12">
							<div class="card shadow-lg my-3" style="background: rgba(255, 255, 255, 0.9);">
								<div class="card-body">
									<div class="input-group">
										<textarea class="form-control overflow-auto" rows=15 maxlength="300" id="lrtotoe"></textarea>
										<!--I Love You 3000 Times-->
									</div>
									<h5 class="my-1">当前字数：<span id="textnum">0</span>/300</h5>
                                    <button type="button" class="button button-glow button-border button-rounded button-primary my-1 col-sm-5 col-12 shadow" data-bs-toggle="modal" data-bs-target="#notice">
                                    Go
                                    </button>
                                    <!-- Modal -->
                                    
                                    
    
									<h6 class="my-2 col-12 m-2" style="color: black;">提示：<br>若由于输入法与字数限制冲突无法完整输入，建议在记事本或备忘录中写好再粘贴到输入框中</h6>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<script src="https://cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.min.js"></script>

        <script src="./static/js/index.js"></script>
        
		<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.bundle.min.js" integrity="sha384-gtEjrD/SeCtmISkJkNUaaKMoLD0//ElJ19smozuHV6z3Iehds+3Ulb9Bn9Plx0x4" crossorigin="anonymous"></script>
	</body>
</html>